﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/DefaultThemes/Styles/MemberGuestLayoutStyle.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/DefaultThemes/Styles/jquery.alerts.css")" rel="stylesheet" type="text/css" />
    <link href="/Content/DefaultThemes/Styles/ticker-style.css" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
     <script src="/Scripts/jquery.alerts.js" type="text/javascript"></script>
    <script src="../../Scripts/kkcountdown.js" type="text/javascript"></script>
    <script type="text/javascript">
            function callTimeMini(id) {
                $(function () {
                    $("#kkcount-down-"+id).kkcountdown({
                        dayText: 'ngày ',
                        daysText: ' ngày ',
                        hoursText: ' giờ ',
                        minutesText: ' phút ',
                        secondsText: ' giây',
                        displayZeroDays: true,
                        callback: test,
                        
                    });
                });
                function test() {
                    console.log('KONIEC');
                }
            };
             $(document).ready(function () {



            $(window).scroll(function () {
                if ($(this).scrollTop() != 0) {
                    $('#bttop').slideDown();
                }
                else {
                    $('#bttop').slideUp();
                }
            });
            
            $("#realloxer").click(function () {
                    
                     $.post("/Home/Subscribe", {"email": $("#email").val() },
                        function (data) {

                          jAlert(data.toString(), 'Thông báo',redirect);
                        
                          
                        });
                        
                });
                function redirect()
                {
                    window.location.href='@Url.Action("Index","Home")';
                };

            $('#bttop').click(function () {
                $('body').animate({ scrollTop: 0 }, 800);
            });

             $("#menu-item").mouseover(function () {
                                 $('#Quantri').hide();
                                 $('#filter').slideToggle();
                                 
                             });

            });
            function show()
            {
                
                location='@(Url.Action("About", "Home"))';
            };
    </script>
        <style type = "text/css">
         #bttop
        {
            border: 1px solid #4adcff;
            background: #24bde2;
            text-align: center;
            padding: 5px;
            position: fixed;
            bottom: 35px;
            right: 10px;
            cursor: pointer;
            display: none;
            color: #fff;
            font-size: 11px;
            font-weight: 900;
        }
        #bttop:hover
        {
            border: 1px solid #ffa789;
            background: #ff6734;
        }
         .SiteMap
        {
            position: fixed;
             top: 40%;
             height: 286px;
             width: 50px;
        }
        
        .btSitemap {
            width: 39px;
            height: 118px;
            float: left;
            border: none;
        }
        .btSitemap  a img
        {
            
            width: 39px;
            height: 118px;
            background: url(../../Content/DefaultThemes/Images/Sitemaps2.png) no-repeat;
            background-position: -2px -2px;
            border-radius: 3px;
            border: none;
        }
        .btSitemap  a img:hover
        {
            
            width: 39px;
            height: 118px;
            background: url(../../Content/DefaultThemes/Images/Sitemaps2.png) no-repeat;
            background-position: -2px -127px;
            border-radius: 3px;
            border: none;
        }
        .btAboutus {
            width: 39px;
            height: 118px;
            float: left;
            border: none;
        }
        .btAboutus  a img
        {
            
            width: 39px;
            height: 118px;
            background: url(../../Content/DefaultThemes/Images/lien-he2.png) no-repeat;
            background-position: -2px -2px;
            border-radius: 3px;
            border: none;
        }
        .btAboutus  a img:hover
        {
            
            width: 39px;
            height: 118px;
            background: url(../../Content/DefaultThemes/Images/lien-he2.png) no-repeat;
            background-position: -2px -127px;
            border-radius: 3px;
            border: none;
        }
        </style>
</head>
<body>
<div id="fb-root"></div>
<script>    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1&appId=361148687280051";
        fjs.parentNode.insertBefore(js, fjs);
    } (document, 'script', 'facebook-jssdk'));
</script>
    <div id='bttop'>BACK TO TOP</div>
    <div class="SiteMap">
        <div class="btSitemap">
            <a href="@Url.Action("SiteMaps","Home")">
                <img/>
            </a>
        </div>
        <div class="btAboutus">
            <a href="@Url.Action("About","Home")">
                <img/>
            </a>
        </div>
    </div>
    <div id="main">
        <div id="topbar">

                <div id="realloxer" class="button_guiemail">
                    <input type="submit" value="Gửi đăng kí" class="button_cam"/>
                </div>
                <div class="wrap_email">
                    Đằng ký nhận email thông báo giảm giá
                     <input id="email" name="email" type="text" value="" />
                </div>

           
           
             @using (Html.BeginForm("Index", "Home", FormMethod.Post))
             {
                 
                 @Html.DropDownList("Options", ViewBag.ListProVince as SelectList, new { onchange = "this.form.submit();", @class = "city" })
                
             }
             
        </div>
        <div id="header">
            <div id="logo">
                <a href="@Url.Action("Index", "Home")">
                    <img src="/Content/DefaultThemes/Images/G2logo.png" height="100" style="float: left;">
                </a>
            </div>
            <br/>
            <div id="hotline">
                <span class="sdt_hotline">08.2200.3547</span></div>
            <div id="box_search">
                @using (Html.BeginForm("Search", "Home"))
                {
                    <div class="o_search">
                    @Html.TextBox("KeyWord", "Tên, mã sản phẩm hoặc từ khóa...", new { onfocus = "if(this.value=='Tên, mã sản phẩm hoặc từ khóa...')this.value='';", onblur = "if(this.value=='')this.value='Tên, mã sản phẩm hoặc từ khóa...';" })                      
                    </div>
                    <div class="nut_search">
                        <input type="submit" value="Tìm Kiếm" class="button_cam" />
                    </div>
                }
            </div>
        </div>
        <!-------BEGIN MENU---------->
        <div id="main_menu">
            <div class="goc_trai">
            </div>
            <div class="nd_menu">
                <div class="box_menu_page">
                    <ul>
                        <li><a href="@Url.Action("Index", "Home")">Deal mới</a></li>
                        <li><a href="@Url.Action("DealExpired", "Home")">Deal đã bán</a></li>

                        <li id="menu-item"><a href="">Chọn deal theo ngành</a> </li>
                        
                        <li><a href="@Url.Action("Guide", "Home")">Hướng dẫn</a></li>
                        @{if (User.IsInRole("company"))
                          { Html.RenderPartial("_MenuForCompany"); }
                          }
                    </ul>
                </div>
                <div class="box_menu_login">
                    @{
                        if (User.IsInRole("company"))
                        {
                            Html.RenderPartial("_LogOnCompanyPartial");
                        }
                        else
                        {
                            Html.RenderPartial("_LogOnPartial");
                        }
                    }
                </div>
            </div>
            <div class="goc_phai">
            </div>
        </div>
        <div class="row_empty">
         
            <div class="submenu" style="display: none;" id= "filter">
                <div id="division_list_new" class="clearfix">
                 @foreach (var catalogy in ViewBag.ListCatalogy as List<DealKhuyenMaiV2.com.Models.Catalogy>)
                 {
                    <ul>
                        <li>@Html.ActionLink(catalogy.NameCatalogy, "Filter", "Home", new { IDCatalogy = catalogy.IDCatalogy }, null) </li>
                    </ul>
                 }
                    
                </div>

            </div>
            @{Html.RenderPartial("_SubMenuDoanhNghiep");}
           
        </div>
        <!-------END MENU---------->
        <!-------BEGIN CONTENT---------->
        <div id="content">
            <!-------BEGIN COL LEFT---------->
            <div class="col_left">
                @RenderBody()
            </div>
            <!-------END COL LEFT---------->
            <div class="col_right">
                @*<!--Begin Box Hướng dẫn-->
            <div class="wrap_box_right">
                <div class="title_box">HƯỚNG DẪN</div>
                <div class="content_box">
                    <div class="menu_box">
                        <ul>
                            <li><a href="#">Điều kiện giao hàng tận nơi</a></li>
                            <li><a href="#">Miễn phí giao hàng khi mua 5 sản phẩm trở lên</a></li>
                            <li><a href="#">Hướng dẫn thanh toán</a></li>
                            <li><a href="#">Hướng dẫn mua hàng</a></li>
                        </ul>
                    </div>
                </div>
                <div class="bottom_box">
                    <img src="/Content/DefaultThemes/Images/space.gif" height="17px" width="17px" alt=""/>
                </div>
            </div>
            <!--End Box Hướng dẫn->*@
                <!--Begin Box Ho tro online-->
                <div class="wrap_box_right">
                    <div class="title_box">
                        HỖ TRỢ TRỰC TUYẾN
                    </div>
                    <div class="content_box">
                        <div class="nguoi_hotro">
                            <a href="ymsgr:sendim?toivanlatoi_020689">
                                <img width="125" height="25" src="http://opi.yahoo.com/online?u=toivanlatoi_020689&amp;m=g&amp;t=2"
                                    hspace="12" align="absmiddle" />
                            </a>Mr.Gnoc
                        </div>
                        <div class="wrap_sdt">
                            <span class="sdt">08.2200.3547</span>
                        </div>
                        <div class="fb-like-box" data-href="http://www.facebook.com/dealkhuyenmaig2com" data-width="240"
                            data-height="80" data-show-faces="false" data-stream="false" data-header="false">
                        </div>
                    </div>
                    <div class="bottom_box">
                        <img src="/Content/DefaultThemes/Images/space.gif" height="17px" width="17px">
                    </div>
                </div>
                <!--End Box Ho tro online-->
                <div class="wrap_box_right">
                    <div class="title_box">
                        Khuyến mãi đang chạy</div>
                    <div class="content_box">
                        <ul class="BoxDealRun">
                            @foreach (var product in ViewData["ListProduct"] as List<DealKhuyenMaiV2.com.Models.Product>)
                            {
                                <li>
                                    <h4>
                                        <a @Url.Action("Details", "Home", new { idProduct = product.IDProduct }) >@product.NameProduct</a>
                                    </h4>
                                    <div class="DealRunning">
                                        <a class="Left" title="@product.NameProduct"
                                       href="@Url.Action("Details", "Home", new { idProduct = product.IDProduct })">
                                            <img width="240" height="184" title="@product.NameProduct"
                                             src="@(((product.Images.Count > 0) ? product.Images.ElementAt(0).Path : "/Content/Images/no-images.png"))" />
                                        </a><a class="View" href="@Url.Action("Details", "Home", new { idProduct = product.IDProduct })">
                                            <span>Xem</span></a>
                                        <div class="GiaDealRun">
                                            <p class="TextOff">
                                                <span title="" class="">@product.Price</span> đ</p>
                                            <p class="TextSpace">
                                                Còn lại</p>
                                            <p class="Right">
                                                <strong class="Text16"><span title="" class="">@(product.Price - product.Discount)</span></strong>&nbsp;<span
                                                    class="Text12">đ</span></p>
                                        </div>
                                    </div>
                                </li>
                            }
                        </ul>
                    </div>
                    <div class="bottom_box">
                        <img src="/Content/DefaultThemes/Images/space.gif" height="17px" width="17px">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer">
        <div class="wrap_footer">
            <div class="box_company">
                VỀ CHÚNG TÔI<br />
                <a href="#">- Giới thiệu</a><br />
                <a href="#">- Liên hệ<br />
                </a>
            </div>
            <div class="box_company">
                CHO DOANH NGHIỆP<br />
                <a href="#">- Hình thức hợp tác</a><br />
                <a href="#">- Câu hỏi thường gặp<br />
                </a>
            </div>
            <div class="box_company">
                ĐIỀU KHOẢN SỬ DỤNG<br />
                <a href="#">- Mua hàng và thanh toán<br />
                </a>
            </div>
            <div style="height: 20px; clear: both;">
            </div>
            <div style="display: none;" typeof="v:Review-aggregate" xmlns:v="http://rdf.data-vocabulary.org/#">
                <span property="v:itemreviewed">deal khuyen mai</span> <span rel="v:rating"><span
                    typeof="v:Rating"><span property="v:average">9.8</span>rate<span property="v:best">10</span>
                </span></span>dealkhuyenmai.com<span property="v:count">86,968</span>khách hàng
            </div>
        </div>
    </div>
    
    
</body>
</html>
